#ifndef _USART_H
#define _USART_H

#include "stm32f0xx.h"
#include <stdio.h>

#define USART_REC_LEN 255
#define DEBUG 0

extern uint8_t USART_RX_BUF[USART_REC_LEN];  //接收缓冲,最大USART_REC_LEN个字节
//接收状态
//bit15：接收完成标志
//bit14：接收到0x0d
//bit13~0：接收到的有效字节数目，最大512字节

extern uint16_t USART_RX_STA;    //接收状态标记

void Usart_Init1(uint32_t bound);
void Usart_Init2(uint32_t bound);

#endif
